//--------------------------------------------------------------------------------
// This file is a portion of the D2D1Renderer.  It is distributed
// under the MIT License, available in the root of this distribution and 
// at the following URL:
//
// http://www.opensource.org/licenses/mit-license.php
//
// Copyright (c) Mirco Timmermann
//
//--------------------------------------------------------------------------------
#pragma once

#include <string>

class KeyString {
public:
	static const int UNKNOWN;
	static const int RETURN;
	static const int DELETE_;
	static const int BACKSLASH;
	static const int LEFT;
	static const int RIGHT;
	static const int COPY;
	static const int PASTE;
	static const int KEY;

	struct KeyState {
		unsigned int vkey; //virtual key
		unsigned int ckey; //char key
		bool ctrlPressed;
		bool shiftPressed;

		KeyState() {
			vkey = 0;
			ckey = 0;
			ctrlPressed = false;
			shiftPressed = false;
		}
	};

	

public:
	//static const std::string DELIMITERS;
	KeyString();
	~KeyString();

	int Update(std::string& text, int& indexStart, int& indexEnd, KeyState keyState);

};